package com.trace.pplos.parse.service.impl;

import com.alibaba.fastjson.JSON;
import com.trace.pplos.parse.dao.dataobject.MqmyInfo;
import com.trace.pplos.parse.dao.mapper.MqmyInfoMapper;
import com.trace.pplos.parse.service.MqmyInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by goldzql on 2017/8/6.
 */
@Service
public class MqmyInfoServiceImpl implements MqmyInfoService {

    private static final Logger logger = LoggerFactory.getLogger(MqmyInfoServiceImpl.class);

    @Autowired
    private MqmyInfoMapper mqmyInfoMapper;

    @Override
    public int insert(MqmyInfo record) {
        try{
            if(record == null)return 0;
            return mqmyInfoMapper.insertSelective(record);
        }catch(Exception e){
            logger.error(e.getMessage(), e, JSON.toJSON(record));
            return 0;
        }
    }
}
